using System.Collections.Generic;
using CoreLibrary.Service;

namespace CoreLibrary.Messaging {

    public interface IMessageQueue : IService {
        
        SendMessageResponse SendMessage(SendMessageRequest request);
        SendMessageBatchResponse SendMessageBatch(SendMessageBatchRequest request);

        List<IMessageHandler> ListMessageHandlers();
        void InsertMessageHandler(IMessageHandler handler);
        void RemoveMessageHandler(IMessageHandler handler);

        int GetMaxActiveMessageCount();
        int GetMessageCount();
        int GetProcessingMessageCount();
        int GetAwaitingMessageCount();

        MessageQueueStatus GetQueueState();

        List<Message> ListMessages(int offset, int max);
        Message RemoveMessage(string messageId);
        Message RetryMessage (string messageId, string errorMsg);

    }

}